﻿// Shader-Based-Image-Processing (SBIP)
// http://code.google.com/p/sbip/
//
// Copyright © Frank Nagl, 2009-2010
// admin@franknagl.de
//
namespace SBIP
{
    using System.Windows.Forms;
    using System;
    using SBIP.Filter;

    /// <summary>Filter specified properties form.</summary>
    public partial class SobelForm : Form
    {
        SobelEdgeDetector filter;

        /// <summary>
        /// Initializes a new instance of the <see cref="SobelForm"/> class.
        /// </summary>
        /// <param name="processor">The processor.</param>
        public SobelForm(Processor processor)
        {
            InitializeComponent();
            this.filter = new SobelEdgeDetector();
            processor.Filter = this.filter;
        }

        private void LaplaceTrackBar_ValueChanged(object sender, EventArgs e)
        {
            //filter.Factor = LaplaceTrackBar.Value;
            //LaplaceStrengthLabel.Text = LaplaceTrackBar.Value.ToString();
        }

        private void YesRadioButton_CheckedChanged(object sender, EventArgs e)
        {
            if (((RadioButton)sender).Checked)
                filter.IsColored = true;
        }

        private void NoRadioButton_CheckedChanged(object sender, EventArgs e)
        {
            if (((RadioButton)sender).Checked)
                filter.IsColored = false;
        }
    }
}
